<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="zh">
<head>
<meta charset="utf-8" />
<title>SaltStack Admin - 用户管理</title>
<meta name="description" content="Luxiaok" />
<meta name="keywords" content="Luxiaok" />
<!-- We need to emulate IE7 only when we are to use excanvas -->
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<![endif]-->
<!-- Favicons --> 
<link rel="shortcut icon" type="image/png" href="/static/images/favicons/favicon.png"/>
<link rel="icon" type="image/png" href="/static/images/favicons/favicon.png"/>
<link rel="apple-touch-icon" href="/static/images/favicons/apple.png" />
<!-- Main Stylesheet --> 
<link rel="stylesheet" href="/static/css/main.css" type="text/css" />
<!-- Your Custom Stylesheet --> 
<link rel="stylesheet" href="/static/css/custom.css" type="text/css" />
<!-- 用户列表css样式 --> 
<link rel="stylesheet" href="/static/css/tables.css" type="text/css" />
<!-- jQuery with plugins -->
<script type="text/javascript" src="/static/js/jquery-1.8.3.min.js"></script>
<!--
Could be loaded remotely from Google CDN : 
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
-->
<!-- Superfish Navigation -->
<script type="text/javascript" src="/static/js/jquery.superfish.min.js"></script>
<script type="text/javascript" src="/static/js/jquery.supersubs.min.js"></script>
<!-- 删除和启用用户确认函数 -->
<script type="text/javascript" src="/static/js/users.list.js"></script>
<!-- 顶部导航和底部隐藏的导航的特效输出 -->
<script type="text/javascript" src="/static/js/nav.show.menu.js"></script>
</head>
<body>
	<!-- Header -->
	<%include file="header.html" args="curM='users',ShowName=ShowName,uid=uid" />
	<!-- End of Header -->
	<!-- Page title -->
	<div id="pagetitle">
		<div class="wrapper">
			<h1>用户管理</h1>
			<!-- Quick search box -->
			<form action="" method="get"><input class="" type="text" id="q" name="q" /></form>
		</div>
	</div>
	<!-- End of Page title -->
	
	<!-- Page content -->
	<div id="page">
		<!-- Wrapper -->
		<div class="wrapper">
	      <div>
		  <table width=100%>
		  <tr>
			  <td><h3>用户列表</h3></td>
              <td align='right'><a href="/users/add" class="btn"><span class="icon icon-add">&nbsp;</span>添加用户</a></td>
          </tr>
          </table>					
					<table class="datalist" >
						<thead>
							<tr>
								<th>ID</th>
								<th>用户名</th>
								<th>姓名</th>
								## <th>手机号</th>
								## <th>电子邮箱</th>
								<th>级别</th>
								<th>注册时间</th>
								<th>登录IP地址</th>
								<th>登录时间</th>
								<th>备注</th>
								<th>状态</th>
								<th>管理</th>
							</tr>
						</thead>
						<tbody>
						
						% for aid in UsersData:
						    <%
						        cuid = UsersData[aid]['id']
						        username = UsersData[aid]['username']
						        nickname = UsersData[aid]['nickname']
						        mobile = UsersData[aid]['mobile']
						        email = UsersData[aid]['email']
						        level = UsersData[aid]['level']
						        status = UsersData[aid]['status']
						        loginhost = UsersData[aid]['loginhost']
						        logindate = UsersData[aid]['logindate']
						        regdate = UsersData[aid]['regdate']
						        comment = UsersData[aid]['comment']
						    %>
							<tr class="dataline">
								<td>${cuid}</td>
								<td>${username}</td>
								<td>${nickname}</td>
								##<td>${mobile}</td>
								##<td>${email}</td>
								<td>${level}</td>
								<td>${regdate}</td>
								<td>${loginhost}</td>
								<td>${logindate}</td>
								<td>${comment}</td>
								<td>${status}</td>
								<td>
								<a href="/users/edit?id=${cuid}" >详情</a> | 
								% if status == '已启用':
								    % if uid != cuid:
								    <a href="/users/disable?id=${cuid}" onClick="return isDisable()" >禁用</a> | 
								    % else:
								    ## 禁止自己禁用自己
								    禁用 | 
								    % endif
                                % else:
                                    <a href="/users/enable?id=${cuid}" onClick="return isEnable()" >启用</a> | 
								% endif
                                % if uid != cuid:
								<a href="/users/del?id=${cuid}" onClick="return isDel()" >删除</a> | 
                                % else:
                                ## 禁止用户删除自己
                                删除 | 
                                % endif
								<a href="/users/edit?id=${cuid}" >编辑</a></td>
							</tr>
						% endfor
						</tbody>
						<tfoot>
							<tr>
								<th>ID</th>
								<th>用户名</th>
								<th>姓名</th>
								##<th>手机号</th>
								##<th>电子邮箱</th>
								<th>级别</th>
								<th>注册时间</th>
								<th>登录IP地址</th>
								<th>登录时间</th>
								<th>备注</th>
								<th>状态</th>
								<th>管理</th>
							</tr>
						</tfoot>
					</table>
	      </div>
		</div>
		<!-- End of Wrapper -->
	</div>
	<!-- End of Page content -->
<%include file="footer.html" />	
</body>
</html>
